﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XKJ.OAWeb.Infrastructrue;
using XKJ.OAWeb.Models;
using XKJ.OAWeb.Shared;

namespace XKJ.OAWeb.Application
{
    public class RoleLimitsService : IRoleLimitsService
    {
        IBaseRepository<RoleLimits> _rolelimits;

        public RoleLimitsService(IBaseRepository<RoleLimits> rolelimits)
        {
            _rolelimits = rolelimits;
        }
        //添加
        public int RoleLimitsAdd(RoleLimits roleLimits)
        {
            return  _rolelimits.Add(roleLimits);
        }
        //显示+查询
        public List<RoleLimits> UserRoleShow(int Id)
        {
            var list = _rolelimits.Show().Where(x => x.RId == Id).ToList();
            return list;
        }

    }
}
